package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

/**
 * Created by ChenYong on 2017-08-09.
 * <br>
 * 权限列表的请求参数。
 */
public class PermissionListParam extends Page2Param {
    /**
     * 登录 ID
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_50, message = "账号的长度在0至50个字之间")
    private String loginid;
    /**
     * 姓名
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_50, message = "姓名的长度在0至50个字之间")
    private String loginName;
    /**
     * 权限分配状态：0-未分配；1-已分配
     */
    @Range(min = Constants.VALUE_0, max = Constants.VALUE_1, message = "权限分配状态在0至1之间")
    private Integer permissionStatus;

    /**
     * 默认构造器。
     */
    public PermissionListParam() {
        super();
    }

    public String getLoginid() {
        return loginid;
    }

    public void setLoginid(String loginid) {
        this.loginid = loginid;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public Integer getPermissionStatus() {
        return permissionStatus;
    }

    public void setPermissionStatus(Integer permissionStatus) {
        this.permissionStatus = permissionStatus;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("PermissionListParam{");
        sb.append("loginid='").append(loginid).append('\'');
        sb.append(", loginName='").append(loginName).append('\'');
        sb.append(", permissionStatus=").append(permissionStatus);
        sb.append(", sEcho=").append(sEcho);
        sb.append(", iColumns=").append(iColumns);
        sb.append(", iSortingCols=").append(iSortingCols);
        sb.append(", iDisplayStart=").append(iDisplayStart);
        sb.append(", iDisplayLength=").append(iDisplayLength);
        sb.append(", startDate='").append(startDate).append('\'');
        sb.append(", endDate='").append(endDate).append('\'');
        sb.append('}');
        return sb.toString();
    }
}